<%@page import="beans.Curso"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
	<%@ taglib uri="http://displaytag.sf.net/el" prefix="tb"%>

<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>
<script type="text/javascript">
function abrirpopupEdit() {
	$("#dgEditarCurso").dialog("open");

}
function abrirpopupElim() {

	$("#dgMsgOptimo").dialog("open");

}
</script>

<script type="text/javascript">
document.getElementById("tbCurso").onclick = function(e) {
	if (!e)
		e = window.event;
	if (!e.target)
		e.target = e.srcElement;
	var TR = e.target;
	while (TR.nodeType == 1 && TR.tagName.toUpperCase() != "TR")
		TR = TR.parentNode;
	var celdas = TR.getElementsByTagName("TD");
	if (celdas.length != 0)
	document.getElementById('txtCodigoCurso').value = celdas[0].innerHTML;
	document.getElementById('txtNombreCurso').value = celdas[1].innerHTML;
	document.getElementById('txtDescripcionCurso').value = celdas[2].innerHTML;
	document.getElementById('txtAreaCurso').value = celdas[3].innerHTML;
	document.getElementById('cboEstado').selectedIndex = celdas[5].innerHTML;
	
};
</script>
</head>
<body>

	<tb:table id="tbCurso" name='<%=session.getAttribute("listaCurso")%>'>
	<tb:column property="codigo" title="Codigo"/>
	<tb:column property="nombre" title="Nombre"/>
	<tb:column property="descripcion" title="Descripcion"/>
	<tb:column property="area" title="Area"/>
	<tb:column class="acciones" title="Acciones">
		<input type="button" id="btnEditarCurso" onclick="abrirpopupEdit();"/>
			<input type="button" id="btnEliminarCurso" ondblclick="eliminarCurso(); abrirpopupElim();">
	</tb:column>
	<tb:column style="display:none;" property="estado" title=""/>
	</tb:table>

</body>
</html>